<h2>Edit User</h2>

<?php if ($updated) : ?>
<strong>Data user berhasil diperbarui.</strong><br/>
<?php echo anchor("admin/user", "Kembali ke Managemen User", array('style' => 'font-weight: bold; color:#990000')) ?>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<?php else : ?>
Isikan form berikut untuk mengedit data user.



<form action="" method="post">

    <table width="100%">

        <tr>
            <td width="25%">ID user</td>
            <td><?php echo $user['id_user']; ?></td>
        </tr>
        <tr>
            <td width="25%">Username</td>
            <td><input type="text" value="<?php echo $user['username'] ?>" name="username" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Password</td>
            <td><input type="text" value="" name="password" size="30"/> (kosongkan bila tidak ingin diubah)</td>
        </tr>
        <tr>
            <td width="25%">Nama lengkap</td>
            <td><input type="text" value="<?php echo $user['nama_lengkap'] ?>" name="nama_lengkap" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Alamat</td>
            <td><input type="text" value="<?php echo $user['alamat'] ?>" name="alamat" size="70"/></td>
        </tr>
        <tr>
            <td width="25%">No. Telepon</td>
            <td><input type="text" value="<?php echo $user['telp'] ?>" name="telp" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Umur</td>
            <td><input type="text" value="<?php echo $user['umur'] ?>" name="umur" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Pekerjaan</td>
            <td><input type="text" value="<?php echo $user['pekerjaan'] ?>" name="pekerjaan" size="30"/></td>
        </tr>
        <tr>
            <td width="25">Tempat Lahir</td>
            <td><input type="text" value="<?php echo $user['tempat_lahir'] ?>" name="tempat_lahir" size="30"/></td>
        </tr>
        <tr>
            <td width="25">Tanggal Lahir</td>
            <td><input type="text" value="<?php echo $user['tgl_lahir'] ?>" name="tgl_lahir" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Email</td>
            <td><input type="text" value="<?php echo $user['email'] ?>" name="email" size="30"/></td>
        </tr>
        <tr>
            <td width="25%">Aktif?</td>
            <td>
                <select name="aktif">
                    <option value="1" <?php if($user['aktif'] == 1) echo "selected" ?>>Ya</option>
                    <option value="0" <?php if($user['aktif'] == 0) echo "selected" ?>>Tidak</option>
                </select>
            </td>
        </tr>

        <tr>
            <td></td>
            <td>
                <input type="submit" name="submit" value="Simpan" style="font-size: 15px"/>
            </td>
        </tr>



    </table>

</form>
<?php endif; ?>